PrintDefault
standard settings. This sets the information normally associated with "Page
Setup..." and "Print..." menu items.
hPrtRec is a handle leading to a 120-byte TPrint structure. Upon return, its fields have been initialized to system defaults found in the
printer's 'PREC' resource.
Notes: The normal sequence is to call NewHandle to allocate an empty TPrint structure, then call PrintDefault to pre-set the fields for subsequent if (hPrtRec == 0 ) { /*... error allocating the record ... */}
PrStlDialog( hPrtRec ); /* respond to "Page Setup..." menu */ if ( PrJobDialog( hPrtRec ) ) { /* respond to "Print..." menu */ /*... do the printing ...*/ /* see PrOpenDoc for an example */ }
Most applications will maintain a copy of the TPrint last used for printing the document, so that settings will be correct for future printings. If you
use this technique, be sure to call PrValidate to ensure that these defaults are correct for the active printer and are otherwise valid.